package com.member.utils;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * @auther Result
 * @date 2023/12/4 16:05
 */
@Data
@AllArgsConstructor
public class Result {

    private String status;
    private String msg;
    private String signature;
    private Object data;


    //添加signature通知类报文机制


    private Result(){}

    public static Result success(){
        return new Result("OK","0000","",null);
    }
    public static Result success(Object data){
        return new Result("OK","0000","", data);
    }
    public static Result error(String msg){
        return new Result("ERROR",msg,"",null);
    }
    public static Result error(String msg,Object data){
        return new Result("ERROR",msg, "",data);
    }
}
